<?php

namespace app\admin\model;

use think\Model;

class Track extends Model
{
    protected $table = 'petct_order_track';

    /**
     * 增加订单状态
     * @param $params
     * @return array
     */
    public function addTrack($params)
    {
        try {

            $params['add_time'] = date('Y-m-d H:i:s');
            $params['admin_name'] = session('admin_user_name');

            if(empty($params['tips_time'])) {
                return modelReMsg(-1, '','提醒时间不能为空');
            }

            $this->insert($params);
        }catch (\Exception $e) {

            return modelReMsg(-1, '', $e->getMessage());
        }

        return modelReMsg(0, '', '订单二次开发跟踪更新成功');
    }
}